//引入封装的reuest请求
const {
  request
} = require('./request.js');
const GET = 'GET';
const POST = 'POST';
const PUT = 'PUT';
const FORM = 'FORM';
const DELETE = 'DELETE';

//基于业务封装的接口
module.exports = {
  //通过token中的openId查询用户的imei
  //然后返回该imei的最新数据
  getLocation: () => {
    return request('location/866374065365563', GET, '')
  },
  getLocationByToken: () => {
    return request('location', GET, '')
  },
  //
  saveDevice: (data) => {
    return request('device/saveDevice', POST, data)
  },
}